<?php
session_start ();
print_r ( $_SESSION );
$_SESSION ['pathway'] = '.';
$_SESSION ['pathway_js'] = '/genetiquespataxeurospa';
include_once ($_SESSION ['pathway'] . "/header.php");

if (! isset ( $_SESSION ['id'] )) {
	echo "<table class='principale'><tr><td>Session expired</td></tr>";
	echo "<a href='" . $_SESSION ['pathway'] . "/index.php'>Start</a></table>";
} elseif ($_SESSION ['acces_genetique'] < 2) {
	echo "<table class='principale'><tr><td>Restricted area</td></tr>";
	echo "<a href='" . $_SESSION ['pathway'] . "/start.php'>Home</a></table>";
} else {
	
	// supprimer fiche
	if (isset ( $_GET ['delete'] ) and isset ( $_GET ['table'] )) {
		$query_deletefiche = "DELETE FROM `" . $db . "`.`" . $_GET ['table'] . "` WHERE `" . $_GET ['table'] . "`.`index` = " . $_GET ['delete'];
		mysql_query ( $query_deletefiche );
		$table = $_GET ['table'];
	}
	
	if (isset ( $_GET ['delete'] )) {
		$_SESSION ['delete'] = $_GET ['delete'];
		require_once ("./requetes/delete_genetics.php");
		unset ( $_SESSION ['delete'] );
	}
	
	if (isset ( $_GET ['from'] ) and $_GET ['from'] == 'fiche_activite') {
		require_once ("./fichespataxeurospa/requetes/remplissage_fiche_activite.php");
	}
	
	// modifications
	if (isset ( $_GET ['edit'] ) and isset ( $_GET ['table'] )) {
		$_SESSION ['edit'] = $_GET ['edit'];
		require_once ("./genetiquespataxeurospa/requetes/remplissage_" . $_GET ['table'] . ".php");
		// require_once("./genetiquespataxeurospa/requetes/remplissage_sample.php");
	}
	
	?><p>
	<a href="<?php echo $_SESSION['pathway']; ?>/index.php">Home</a> > <a
		href='./index.php'>Genetics</a> > Linkage
</p><?php
	
	$formatdate = $_SESSION ['date'];
	
	?>


<table class='principale'>
	<tr>
		<td>Ok<br /> <a href="./index.php">Back to start</a></td>
	</tr>
</table>


<?php
}
?>
